using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Collections.Generic;

[WebService(Namespace = "http://www.rensoft.net/HostingService/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class HostingService : System.Web.Services.WebService
{
    [WebMethod]
    public void Test() { }

    [WebMethod]
    public ClientAccount ClientCreate(
        string guid, 
        string code, 
        string fullName, 
        string username, 
        string password)
    {
        return ClientAccount.Create(guid, code, fullName, username, password);
    }

    [WebMethod]
    public void ClientRemove(string guid)
    {
        ClientAccount.Remove(guid);
    }

    [WebMethod]
    public bool ClientCheckUserExists(string username)
    {
        return ClientAccount.CheckUserExists(username);
    }

    [WebMethod]
    public bool ClientCheckGuidExists(string guid)
    {
        return ClientAccount.CheckGuidExists(guid);
    }

    [WebMethod]
    public ClientAccount ClientFetchByGuid(string guid)
    {
        return ClientAccount.Fetch(guid);
    }

    [WebMethod]
    public Website WebsiteCreate(
        string websiteGuid,
        string clientGuid,
        string title,
        string[] domainArray,
        WebsiteType typeFlags)
    {
        return Website.Create(websiteGuid, clientGuid, title, domainArray, typeFlags);
    }

    [WebMethod]
    public List<string> WebsiteDomainUsage(List<string> domainList)
    {
        return Website.DomainUsage(domainList);
    }

    [WebMethod]
    public Website WebsiteFetchByGuid(string guid)
    {
        return Website.Fetch(guid);
    }
    
    [WebMethod]
    public bool WebsiteCheckGuidExists(string guid)
    {
        return Website.CheckGuidExists(guid);
    }
}